Part Number Hot Search : 
MMBTA05 100000 UZ820 0512SH S100R UPC574 UFT7150 BT3904
Product Description
Full Text Search
 

To Download TS68HC901CFN4 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? ts68hc901 hcmos multi-function peripheral september 1992 the ts68hc901 cmfp (cmos multi-function peripheral) is a combination of many of the neces- sary peripheral functions in a microprocessor sys- tem. included are : . 8 input/output pins ? individually programmable direction ? individual interrupt source capability - programmable edge selection . 16 source interrupt controller ? 8 internal sources ? 8 external sources ? individual source enable ? individual source masking ? programmable interrupt service modes - polling - vector generation - optional in-service status ? daisy chaining capability . four timers with individually programmable prescaling ? two multimode timers - delay mode - pulse width measurement mode - event counter mode ? two delay mode timers ? independent clock input ? time out output option . single channel usart ? full duplex ? asynchronous to 65 kbps ? byte synchronous to 1 mbps ? internal/external baud rate generation ? dma handshake signals ? modem control ? loop back mode . 68000 bus compatible (ordering information at the end of the datasheet description the use of the cmfp in a system can significantly reduce chip count, thereby reducing system cost. the cmfp is completely 68000 bus compatible, and 24 directly addressable internal registers provide the necessary control and status interface to the pro- grammer. the cmfp is a derivative of the mk3801 sti, a z80 family peripheral. 48 1 pdip48 plcc52 1/42
figure 1: ts68hc901 block diagram introduction the ts68hc901 multi-function peripheral (cmfp) is a member of the 68000 peripherals. the cmfp directly interfaces to the 68000 processor via an a- synchronous bus structure. both vectored and pol- led interrupt schemes are supported, with the cmfp providing unique vector number generation for each of its 16 interrupt sources. additionally, handshake lines are provided to facilitate dmac interfacing. re- fer to block diagram of the ts68hc901. the ts68hc901 performs many of the functions common to most microprocessor-based systems. the resources available to the user include: . eight individually programmable i/o pins with in- terrupt capability . 16-source interrupt controller with individual source enabling and masking . four timers, two of which are multi-mode ti- mers . timers may be used as baud rate generators for the serial channel . single-channel full-duplex universal synchro- nous / asynchronous receiver-transmitter (u- sart) that supports asynchronous and with the addition of a polynomial generator checker supports byte synchronous formats by incorporating multiple functions within the cmfp, the system designer retains flexibility while minimi- zing device count. from a programmer's point of view, the versatility of the cmfp may be attributed to its register set. the registers are well organized and allow the cmfp to be easily tailored to a variety of applications. all of the 24 registers are also directly addressable which simplifies programming. the register map is shown in figure 2. ? ts68hc901 2/42
address abbreviation register name hex binary rs5 rs4 rs3 rs2 rs1 01 03 05 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 gpip aer ddr general purpose i/o register active edge register data direction register 07 09 0b 0d 0f 11 13 15 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 iera ierb ipra iprb isra isrb imra imrb vr interrupt enable register a interrupt enable register b interrupt pending register a interrupt pending register b interrupt in-service register a interrupt in-service register b interrupt mask register a interrupt mask register b vector register 19 1b 1d 1f 21 23 25 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 tacr tbcr tcdcr tadr tbdr tcdr tddr timer a control register timer b control register timers c and d control register timer a data register timer b data register timer c data register timer d data register 27 29 2b 2d 2f 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 scr ucr rsr tsr udr synchronous character register usart control register receiver status register transmitter status register usart data register note : hex addresses assume that rs1 connects with a1, rs2connects with a2, etc... and that ds is connected to lds on the 68000 or ds is connect to ds on the 68008. figure 2 : cmfp register map. ? ts68hc901 3/42
figure 3 : pdip pin connection pin description gnd : ground v cc : +5 volts ( 5%) r/w : read/write (input). this input defines a data transfert as a read (high) or write (low) cycle. this signal is used as wr with an intel processor type. dtack : this output signals the completion of the operation phase of a bus cycle to the pro- cessor. if the bus cycle is a processor read, the cmfp asserts dtack to indi- cate that the information on the data bus is valid. if the bus cycle is a processor to the cmfp, dtack acknowledges the acceptance of the data by the cmfp. dtack will be asserted only by an cmfp that has cs or iak (and iei) asserted. this signal is not used with a 6800 pro- cessor type. figure 4 : plcc pin connection pin motorola 6800 type motorola multiplexed intel 48 47 1 35 cs e r/w v ss cs ds r/w as cs rd wr ale cs : chip select (input, active low). cs is u- sed to select the ts68hc901 cmfp for accesses to the internal registers. cs and iack must not be asserted at the same time. ds : data stobe (input, active low).this input is part of the internal chip select and in- terrupt acknowledge functions. the cmfp must be located on the lower portion of the 16-bit data-bus so that the vector number passed to the processor during an interrupt acknowledge cycle will be located in the low byte of the data word. as a result, ds must be connected to the processor's lower data strobe if vectored interrupt are to be used. note that this forces all registers to be located at odd addresses and latches data on the rising edge for writes. this signal is used as rd with an intel processor type. ? ts68hc901 4/42
rs1-rs5: (a1-a5) register address bus (inputs). the ad- dress bus is used to address one of the internal registers during a read or write cycle. d0-d7 : data bus (bi-directional, tri-stateable). this bus is used to receive data from or transmit data to the mfp's internal regis- ters during a processor read or write cy- cle. during an interrupt acknowledge cy- cle, the data bus is used to pass a vector number to the processor. since the mfp is an 8-bit peripheral, the mfp could be located on either the upper or lower por- tion of the 16-bit data bus (even or odd address). however, during an interrupt acknowledge cycle, the vector number passed to the processor must be located in the low byte of the data word. as a re- sult, d0-d7 of the mfp must be connec- ted to the low eight bits of the processor data bus, placing mfp registers at odd addresses if vectored interrupt are to be used. clk : the clock input is a single-phase ttl compatible signal used for internal ti- ming . this input should not be gated off at any time and must conform to mini- mum and maximum pulse width times. the clock is not necessarily the system clock in frequency nor phase. when the bus is multiplexed (mpx=1), an address strobe signal is connected to this pin. in the non multiplexed mode (mpx=0), this input is connected to the system clock when used with a 68000 processor type or to v ss (0v dc ) when used with a 6800 processor type. reset : device reset. (input, active low). reset disables the usart receiver and trans- mitter, stops all timers and forces the ti- mer outputs low, disables all interrupt channels and clears any pending inter- rupts. the general purpose interrupt/i/o lines will be placed in the tri-state input mode. all internal registers (except the ti- mer, usart data registers, and transmit status register) will be cleared. mpx : this input selects the data bus mode: mpx = 0 : non multiplexed mode mpx = 1 : multiplexed mode. the register select lines rs1-rs5 and the data bus d0-d7 are multiplexed. an address strobe must be connected to the clk pin. irq : interrupt request (output, active low, o- pen drain). this output signals the pro- cessor that an interrupt is pending from the cmfp. these are 16 interrupt chan- nels that can generate an interrupt re- quest. clearing the interrupt pending re- gisters (ipra and iprb) or clearing the interrupt mask registers (imra and imrb) will cause irq to be negated. irq will also be negated as the result of an in- terrupt acknowledge cycle, unless addi- tional interrupts are pending in the cmfp. refer to paragraph inter- rupts for further information. iack : interrupt acknowledge (i nput, active l ow ). iack i s us ed t o s ignal t he ts68hc901 that the cpu is acknow- ledging an interrupt. cs and iack must not be asserted at the same time. iei : interrupt enable in (input, active low). iei is used to signal the ts68hc901 that no higher priority device is requesting inter- rupt service. ieo : interrupt enable out (output, active low). ieo is used to signal lower priority peri- pherals that neither the ts68hc901 nor another higher priority peripheral is re- questing interrupt service. i0-i7 : ge neral purpose interrupt i/o lines. these lines may be used as interrupt in- puts and/or i/o lines. when used asinter- rupt inputs, their active edge is program- mable. a data direction register is used to define which lines are to be hi-z inputs and which lines are to be push-pull ttl compatible outputs. so : serial output. this is the output of the u- sart transmitter. si : serial input. this is the input to the u- sart receiver. rc : receiver clock. this input controls the serial bit rate of the usart receiver. tc : transmitter clock. this input controls the serial bit rate of the usart transmitter. rr : receiver ready. (output, active low) dma output for receiver, which reflects the status of buffer full in port number 15. tr : transmitter ready. (output, active low) dma output for transmitter, which re- flects the status of buffer empty in port number 16. ? ts68hc901 5/42
tao,tbo, tco,tdo: timer outputs. each of the four timers has an output which can produce a square wave. the output will change states each timer cycle ; thus one full pe- riod of the timer out signal is equal to two timer cycles. tao or tbo can be reset (logic ooo) by a write to tacr, or tbcr respectively. xtal1, xtal2 : timer clock inputs. a crystal can be connected between xtal1 and xtal2, or xtal1 can be driven with a ttl level clock. when driving xtal1 with a ttl le- vel clock, xtal2 must be allowed to float. when using a crystal, external capacitors are required. see figure 35. all chip ac- cesses are independent of the timer clock. tai,tbi : timer a, b inputs. these inputs are control signals for timers a and b in the pulse width measurement mode and e- vent count mode. these signals gene- rate interrupts at the same priority level as the general purpose i/o interrupt lines i4 and i3, respectively. i4 and i3 do not have interrupt capability when the timers are operated in the pulse width measure- ment mode or the event count mode - un- der these conditions i4 and i3 may only be used for i/o. refer to paragraph ti- mers for further information. signal name mnemonic i/o active power input v cc input high ground gnd input low clock clk input n/a chip select cs input low data strobe ds input low read/write r/w input read-high / write-low data tranfer acknowledge dtack output low register select bus rs1-rs5 input n/a data bus d0-d7 i/o n/a reset reset input low interrupt request irq output low interrupt acknowledge iack input low interrupt enable in iei input low interrupt enable out ieo output low general purpose i/o - interrupt lines i0-i7 i/o n/a timer clock xtal1, xtal2 input high timer inputs tai, tbi input n/a timer outputs tao, tbo, tco, tdo output n/a serial input si input n/a serial output so output n/a receiver clock rc input n/a transmitter clock tc input n/a receiver ready rr output low transmitter ready tr output low mpx mpx input n/a signal summary. ? ts68hc901 6/42
bus operation the following paragraphs explain the control signals and bus operation during data transfer operations and reset. data transfer operations. transfer of data between devices involves the follo- wing pins: register select bus - rs5 through rs1 data bus - d0 through d7 control signals the ad- dress and data buses are separate parallel buses u- sed to transfer data using an asynchronous bus structure. in all cycles, the bus master assumes re- sponsibility for deskewing all signals it issues at both the start and end of a cycle. additionally, the bus master is responsible for deskewing the acknow- ledge and data signals from the peripheral devices. read cycle. to read a cmfp register, cs and ds must be asserted, and r/w must be high. the cmfp will place the content of the register which is selected by the register select bus (rs1 through rs5) on the data bus (d1 through d7) and then as- sert dtack. the register addresses are shown on figure 2. after the processor has latched the data, ds is negated. the negation of either cs or ds will ter- minate the read operation. the cmfp will drive dtack high and place it in the high-impedance state. the timing for a read cycle is shown in figure 21. write cycle. to write a register cs and ds must be asserted, and r/w must be low. the cmfp will de- code the address bus to determine which register is selected. then the register will be loaded with the contents of the data bus and dtack will be asser- ted. when the processor recognizes dtack, ds will be negated. the write cycle is terminated when either cs or ds is negated. the cmfp will drive dtack high and place it in the high-impedance state. the timing for a write cycle is shown in figure 22. interrupt acknowledge operation. the cmfp has 16 interrupt sources, eight internal and eight external. when an interrupt request is pending, the cmfp will assert irq. in a vectored in- terrupt scheme, the processor will acknowledge the interrupt request by performing an interrupt acknow- ledge cycle. iack and ds will be asserted. the cmfp responds to the iack signal by placing a vec- tor number on the lower eight bits of the data bus. this vector number corresponds to the irq handler for the particular interrupt requesting service. the format of this vector number is given in figure 6. when the cmfp asserts dtack to indicate that va- lid data is on the bus, the processor will latch the da- ta and terminate the bus cycle by negating ds. when either ds or iack are negated, the cmfp will terminate the interrupt acknowledge operation by driving dtack high and placing it in the high-impe- dance state. also, the data bus will be placed in the high-impedance state. irq will be negated as a re- sult of the iack cycle unless additional interrupts are pending. the cmfp can be part of a daisy-chain interrupt structure which allows multiple cmfps to be placed at the same interrupt level by sharing a common iack signal. a daisy-chain priority scheme is imple- mented with iei and ieo signals. iei indicates that no higher priority device is requesting interrupt ser- vice. ieo signals lower priority devices that neither this device nor any higher priority devices is reques- ting service. to daisy-chain cmfps, the highest priority cmfp has its iei tied low and successive cmfps have their iei connected to the next higher priority device's ieo. note that when the daisy-chain ? ts68hc901 7/42
interrupt structure is not implemented, the iei of all cmfps must be tied low. when the processor initiates an interrupt acknow- ledge cycle by driving iack and ds, the cmfp whose iei is low may respond with a vector number if interrupt is pending. if this device does not have a pending interrupt, ieo is asserted which allows the next lower priority device to respond to the interrupt acknowledge. when an cmfp propagates ieo, it will not drive the data bus nor dtack during the in- terrupt acknowledge cycle. the timing for an iack cycle is shown in figure 23 and 24. reset operation the reset operation will initialize the cmfp to a known state. the reset operation requires that the reset input be asserted for a minimum of two microseconds. during a device reset condition, all internal cmfp registers are cleared except for the timer data registers (tadr, tbdr, tcdr and tddr), the usart data register (udr), the trans- mitter status register (tsr) and the interrupt vector register. all timers are stopped and the usart re- ceiver and transmitter are disabled. the interrupt channels are also disabled and any pending inter- rupts are cleared. in addition, the general purpose interrupt i/o lines are placed in the high- impedance input mode and the timer outputs are driven low. ex- ternal cmfp signals are negated. the interrupt vec- tor register is initialized to a 0fh. non multiplexed mode in this mode, the mpx input must be set to zero, and the ts68hc901 can be used with a 68000 proces- sor type or a 6800 processor type. refer to figure 21 to 24 for the electrical characteristics. with a 6800 processor type the ds pin is connected to the e signal of the processor, the dtack signal is not used and the clk must be zeroed. multiplexed mode the cmfp can be used either on a motorola or intel bus type. in this case the mpx pin is connec- ted to vcc. the table page 4 gives the signification of the different signals used. a dummy access to the ts68hc901 has to be done before any valid access in order to set up the internal logic of sampling. ? ts68hc901 8/42
interrupt structure in a 68000 system, the cmfp will be assigned to one of the seven possible interrupt levels. all inter- rupt service requests from the cmfp's 16 interrupt channels will be presented at this level. although, as an interrupt controller, the cmfp will internally prio- ritize its 16 interrupt sources. additional interrupt sources may be placed at the same interrupt level by daisy-chaining multiple cmfps. the cmfps will be prioritized by their position in the chain. interrupt processing each cmfp provides individual interrupt capability for its various functions. when an interrupt is recei- ved on one of the external interrupt channels or from one of the eight internal sources, the cmfp will re- quest interrupt service. the 16 interrupt channels are assigned a fixed priority so that multiple pending interrupts are serviced according to their relative im- portance. since the cmfp can internally generate 16 vector numbers, the unique vector number which corresponds to the highest priority channel that as a pending interrupt is presented to the processor du- ring an interrupt acknowledge cycle. this unique vector number allows the processor to immediately begin execution of the interrupt handler for the inter- rupt source, decreasing interrupt latency time. interrupt channel prioritization the 16 interrupt channels are prioritized as shown in figure 5. general purpose interrupt 7 (i7) is the hi- ghest priority interrupt channel and i0 is the lowest priority channel. pending interrupts are presented to the cpu in order of priority unless they have been masked off. by selectively masking interrupts, the channel are in effect re-prioritized. interrupt vector number format during an interrupt acknowledge cycle, a unique 8- bit vector number is presented to the system which corresponds to the specific interrupt source which is requesting service. the format of the vector is shown in figure 6. the most significant four bits of the interrupt vector number are user programmable. these bits are set by writing the upper four bits of the vector register which is shown in figure 7. the low order bits are generated internally by the ts68hc901. note that the binary channel number shown in figure 5 corresponds to the low order bits of the vector number associated with each channel. figure 9 : interrupt channel prioritization priority channel description highest lowest 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 general purpose interrupt 7(i7) general purpose interrupt 6(i6) timer a receive buffer full receive error transmit buffer empty transmit error timer b general purpose interrupt 5(i5) general purpose interrupt 4(i4) timer c timer d general purpose interrupt 3(i3) general purpose interrupt 2(i2) general purpose interrupt 1(i1) general purpose interrupt 0(i0) figure 5 : interrupt channel prioritization ? ts68hc901 9/42
v7 v6 v5 v4 iv3 iv2 iv1 iv0 v7-v4 the four most significant bits are copied from the register iv3-iv0 these bits are supplied by the cmfp. they are the binary channel number of the highest priority channel that is requesting interrupt service. figure 6 : 7 vector register 0 vr (17h) v7 v6 v5 v4 s 0* 0* 0* writing 0 : cleared writing 1 : set cleared on reset v7-v4 the upper four bits of the vector register are written by the user. these bits become the most significant four bits of the interrupt vector number. s in-service register enable. when the s bit is zero, the cmfp is in the automatic end-of-in- terrupt mode and the in-service register bits are forced low. when the s bit is a one, the cmfp is in the software end-of-interrupt mode and the in-service register bits are enabled. * unused bits, read as zero. figure 7 : ts68hc901 ts68hc901 ts68hc901 figure 8 : daisy chaining ? ts68hc901 10/42
daisy-chaining cmfps as an interrupt controller, the ts68hc901 cmfp will support eight external interrupt sources in addi- tion to its eight internal interrupt sources. when a system requires more than eight external interrupt sources to be placed at the same interrupt level, sources may be added to the prioritized structure by daisy-chaining cmfps. interrupt sources are priori- tized internally within each cmfp and the cmfps are prioritized by their position in the chain. unique vector numbers are provided for each interrupt sources. the iei and ieo signals implement the daisy-chai- ned interrupt structure. the iei of the highest priority cmfp is tied low and the ieo output of this device is tied to the next highest priority cmfp's iei. the iei and ieo signals are daisy-chained in this manner for all cmfps in the chain, with the lowest priority cmfp's ieo left unconnected. a diagram of an in- terrupt daisy-chain is shown in figure 8. daisy-chaining requires that all parts in the chain have a common iack. when the common iack is asserted during an interrupt acknowledge cycle, all parts will prioritize interrupts in parallel. when the iei signal to a cmfp is asserted, the part may respond to the iack cycle if it requires interrupt service. otherwise, the part will assert ieo to the next lower priority device. thus, priority is passed down the chain via iei and ieo until a part which has appen- ding interrupt is reached. the part with the pending interrupt passes a vector number to the processor and does not propagate ieo. figure 9a : figure 9b : ? ts68hc901 11/42
interrupt control registers cmpf interrupt processing is managed by the inter- rupt enable registers a and b, interrupt pending re- gisters a and b, and interrupt mask registers a and b. these registers allow the programmer to enable or disable individual interrupt channels, mask indi- vidual interrupt channels, and access pending inter- rupt status information. in-service registers a and b allow interrupts to be nested as described hereafter. the interrupt control registers are shown in fig- ure 10. interrupt enable registers the interrupt channels are individually enabled or di- sabled by writing a one or zero, respectively, to the appropriate bit of interrupt enable register a (iera) or interrupt enable register b (ierb). the processor may read these registers at any time. when a channel is enabled, interrupts received on the channel will be recognized by the cmfp and irq will be asserted to the processor, indicating that interrupt service is required. on the other hand, a di- sabled channel is completely inactive; interrupts re- ceived on the channel are ignored by the cmfp. writing a zero to a bit of interrupt enable register a or b will cause the corresponding bit of interrupt pen- ding register a or b to be cleared. this will terminate all interrupt service requests for the channel and al- so negate irq, unless interrupts are pending from other sources. disabling a channel, however, does not affect the corresponding bit in interrupt in-ser- vice registers a or b. so, if the cmfp is in the soft- ware end-of-interrupt mode and an interrupt is in service when a channel will remain set until cleared by software. interrupt pending registers when an interrupt is received on an enabled chan- nel, the corresponding interrupt pending bit is set in interrupt pending register a or b (ipra or iprb). in a vectored interrupt scheme, this bit will be cleared when the processor acknowledges the interrupting channel and the cmfp responds with a vector num- ber. in a polled interrupt system, the interrupt pen- ding registers must be read to determine the inter- rupting channel and then the interrupting pending bit is cleared by the interrupt handling routine without performing an interrupt acknowledge sequence. a single bit of the interrupt pending registers is clea- red in software by writing ones to all bit positions ex- cept the bit to be cleared. note that writing ones to ipra and iprb has no effect on the contents of the register. a single bit of the interrupt pending regis- ters is also cleared when the corresponding channel is disabled by writing a zero to the appropriate bit of iera or ierb. interrupt mask registers interrupts are masked for a channel by clearing the appropriate bit in interrupt mask register a or b (im- ra or imrb). even though an enabled channel is masked, the channel will recognize subsequent in- terrupts and set its interrupt pending bit. however, the channel is prevented from requesting interrupt service (irq to the processor) as long as the mask bit for that channel is cleared. if a channel is requesting interrupt service at the time that its corresponding bit in imra or imrb is clea- red, the request will cease and irq will be negated, unless another channel is requesting interrupt ser- vice. later, when the mask bit is set, any pending in- terrupt on the channel will be processed according to the channel's assigned priority. imra and imrb may be read at any time. ? ts68hc901 12/42
7 interrupt enable registers 0 iera (07h) gpip7 gpip6 timer a rcv buffer full rcv error xmit buffer empty xmit error timer b ierb (09h) gpip5 gpip4 timer c timer d gpip3 gpip2 gpip1 gpip0 7 interrupt pending registers 0 ipra (0bh) gpip7 gpip6 timer a rcv buffer full rcv error xmit buffer empty xmit error timer b iprb (0dh) gpip5 gpip4 timer c timer d gpip3 gpip2 gpip1 gpip0 writing0:clear writing 1 : unchanged 7 interrupt in-service registers 0 isra (0fh) gpip7 gpip6 timer a rcv buffer full rcv error xmit buffer empty xmit error timer b isrb (11h) gpip5 gpip4 timer c timer d gpip3 gpip2 gpip1 gpip0 7 interrupt mask registers 0 imra (13h) gpip7 gpip6 timer a rcv buffer full rcv error xmit buffer empty xmit error timer b imrb (15h) gpip5 gpip4 timer c timer d gpip3 gpip2 gpip1 gpip0 writing 0 : masked writing 1 : unmasked figure 10 : ? ts68hc901 13/42
nesting cmfp interrupts in a 68000 vectored interrupt system, the cmfp is assigned to one of seven possible interrupt levels. when an interrupt is received from the cmfp, an in- terrupt acknowledge for that level is initiated. once an interrupt is recognized at a particular level, inter- rupts at that same level or below are masked by 68000. as long as the processor's interrupt mask is unchanged, the 68000 interrupt structure will prohi- bit the nesting of interrupts at the same interrupt le- vel. however, additional interrupt requests from the cmfp can be recognized before a previous chan- nel's interrupt service routine is completed by lowe- ring the processor's interrupt mask to the next lower interrupt level within the interrupt handler. when nesting cmfp interrupts, it may be desirable to permit interrupts on any cmfp channel, regar- dless of its priority, to preempt or delay interrupt pro- cessing of an earlier channel's interrupt service re- quest. or, it may be desirable to only allow sub- sequent higher priority channel interrupt requests to supersede previously recognized lower priority in- terrupt requests. the cmfp interrupt structure pro- vides this flexibility by offering two end-of-interrupt options for vectored interrupt schemes. note that the end-of-interrupt modes are not active in a polled interrupt scheme. selecting the end-of-interrupt mode in a vectored interrupt scheme, the cmfp may be programmed to operate in either the automatic end- of-interrupt mode or the software end-of-interrupt mode. the mode is selected by writing the s bit of the vector register (see figure 7). when the s bit is programmed to a one, the cmfp is placed in the software end-of-interrupt mode and when the s bit is a zero, all channels operate in the automatic end- of-interrupt mode. automatic end-of-interrupt when an interrupt vector number is passed to the processor during an interrupt acknowledge cycle, the corresponding channel's interrupt pending bit is cleared. in the automatic end-of-interrupt mode, no further history of the interrupt remains in the cmfp. the in-service bits of the interrupt in-service regis- ters (isra and isrb) are forced low. subsequent interrupts which are received on any cmfp channel will generate an interrupt request to the processor, even if the current interrupt's service routine has not been completed. software end-of-interrupt in the software end-of-interrupt mode, the channel's associated interrupt pending bit is cleared and in ad- dition, the channel's in-service bit of in-service regis- ter a or b is set when its vector number is passed to the processor during an iack cycle. a higher prio- rity channel may subsequently request interrupt ser- vice and be acknowledged, but as long as the chan- nel's in-service bit is set, no lower priority channel may request interrupt service nor pass its vector du- ring an interrupt acknowledge sequence. while only higher priority channels may request in- terrupt service, any channel can receive an interrupt and set its interrupt pending bit. even the channel whose in-service bit is set can receive a second in- terrupt. however, no interrupt service request is made until its in-service bit is cleared. the in-service bit for a particular channel can be cleared by writing a zero to its corresponding bit in isra or isrb and ones to all other bit positions. since bits in the in-service registers can only be cleared in software and not set, writing ones to the register does not alter their contents. isra and isrb may be read at any time. ? ts68hc901 14/42
general purpose input/output interrupt port the general purpose interrupt input/output (i/o) port (gpip) provides eight i/o lines (i0 through i7) that may be operated as either inputs or outputs under software control. in addition, these lines may optio- nally generate an interrupt on either a positive trans- ition or negative transition of the input signal. the flexibility of the gpip allows it to be configured as an 8-bit i/0 port or for bit i/o. since interrupts are en- abled on a bit-by-bit basis, a subset of the gpip could be programmed as handshake lines or the port could be connected to as many as eight exter- nal interrupt sources, which would be prioritized by the cmfp interrupt controller for interrupt service. 6800 interrupt controller the cmfp interrupt controller is particularly useful in a system which has many 6800-type devices. ty- pically, in a vectored 68000 system, 6800-type pe- ripherals use the autovector which corresponds to their assigned interrupt level since they do not pro- vide a vector number in response to an ac cycle. the autovector interrupt handler must then poll all 6800-type devices at that interrupt level to deter- mine which device is requesting service. however, by tying the irq output from a 6800-type device to the general purpose i/o interrupt port (gpip) of a cmfp, a unique vector number will be provided to the processor during an interrupt acknowledge cy- cle. this interrupt structure will significantly reduce interrupt latency for 6800-type devices and other pe- ripheral devices which do not support vector-by-de- vice. gpip control registers the gpip is programmed via three control registers shown in figure 11. these registers control the data direction provide user access to the port, and specify the active edge for each bit of the gpip which will produce an interrupt. these registers are described in detail in the following paragraphs. gpip data register the general purpose i/o data register is used to in- put or output data to the port. when data is written to the gpip data register, those pins which are de- fined as inputs will remain in the high-impedance state. pins which are defined as outputs will assume the state (high or low) of their corresponding bit in the data register. when the gpip is read, data will be passed directly from the bits of the data register for pins which are defined as outputs. data from pins defined as inputs will come from the input buffers. active edge register the active edge register (aer) allows each of the gpip lines to produce an interrupt on either a one- to-zero or a zero-to-one transition. writing a zero the appropriate edge bit of the active edge register causes the associated input to generate an interrupt on the one-to-zero transition. writing a one to the edge bit will produce an interrupt on the zero-to-one transition of the corresponding gpip line. ? ts68hc901 15/42
7 active edge register 0 aer (03h) gpip7 gpip6 gpip5 gpip4 gpip3 gpip2 gpip1 gpip0 1 = rising 2 = falling data direction register ddr (05h) gpip7 gpip6 gpip5 gpip4 gpip3 gpip2 gpip1 gpip0 1 = output 2 = input general purpose i/o data register gpip (01h) gpip7 gpip6 gpip5 gpip4 gpip3 gpip2 gpip1 gpip0 figure 11 : note the transition detector is an exclusive-or gate whose inputs are the edge bit and the input buffer. as a result, writing the ear may cause an interrupt- producing transition, depending upon the state of the input. so, the aer should be configured before enabling interrupts via the interrupt enable registers (iera and ierb). also, changing the edge bit while interrupts are enabled may cause an interrupt on the corresponding channel. data direction register the data direction register (ddr) allows the pro- grammer to define i0 through i7 as inputs or outputs by writing the corresponding bit. when a bit of the data direction register is written as a zero, the cor- responding interrupt i/o pin will be a high-impe- dance input. writing a one to any bit of the data di- rection register will cause the corresponding pin to be configured as a push-pull output. ? ts68hc901 16/42
timers the cmfp contains four 8-bit timers which provide many functions typically required in microprocessor systems. the timers can supply the baud rate clocks for the on-chip serial i/o channel, generate periodic interrupts, measure elapsed time, and count signal transitions. in addition, two timers have waveform generation capability. all timers are prescaler/counter timers with a common independent clock input (xtal1 or xtal2) and are not required to be operated from the system clock. each timer's output signal toggles when the timer's main counter times out. additional- ly, timers a and b have auxiliary control signals which are used in two of the operation modes. an interrupt channel is assigned to each timer and when the auxiliary control signals are used, a sepa- rate interrupt channel will respond to transitions on these inputs. operation modes timers a and b are full function timers which, in ad- dition to the delay mode, operate in the pulse width measurement mode and the event count mode. ti- mers c and d are delay timers only. a brief discus- sion of each of the timer modes follows. delay mode operation all timers may operate in the delay mode. in this mode, the prescaler is always active. the prescaler specifies the number of timer clock cycles which must elapse before a count pulse is applied to the main counter. a count pulse causes the main coun- ter to decrement by one. when the timer has decre- mented down to 01 (hexadecimal), the next count pulse will cause the main counter to be reloaded from the timer data register and a time out pulse will be produced. this time out pulse is coupled to the timer's interrupt channel and, if the channel is en- abled, an interrupt will occur. the time out pulse also causes the timer output pin to toggle. the output will remain in this new state until the next time out pulse occurs. for example, if delay mode with a divide-by-10 pres- caler is selected and the timer data register is loaded with 100 (decimal), the main counter will decrement once every 10 timer clock cycles. after 1,000 timer clocks, a time out pulse will be produced. this time out pulse will generate an interrupt if the channel is enabled (iera, ierb) and in addition, the timer's output line will toggle. the output line will complete one full period every 2,000 cycles of the timer clock. if the prescaler value is changed while the timer is enabled, the first time out pulse will occur at an in- determinate time no less than one nor more than 200 timer clock cycles. subsequent time out pulses will then occur at the correct interval. if the main counter is loaded with 01 (hexadecimal), a time out pulse will occur every time the prescaler presents a count pulse to the main counter. if the main counter is loaded with 00, a time out pulse will occur every 256 count pulses. pulse width measurement operation besides the delay mode, timers a and b may be pro- grammed to operate in the pulse width measure- ment mode. in this mode an auxiliary control input is required ; timers a and b auxiliary input lines are tai and tbi. also, in the pulse width measurement mode, interrupt channels normally associated with i4 and i3 will respond to transitions on tai and tbi, respectively. general purpose lines i3 and i4 may still be used for i/o. a conceptual circuit of the timers ? ts68hc901 17/42
in the pulse width measurement mode is shown in figure 12. the pulse width measurement mode functions simi- larly to the delay mode, with the auxiliary control si- gnal acting as an enable to the timer. when the control signal is active, the prescaler and main coun- ter are allowed to operate. when the control signal is negated, the timer is stopped. so, the width of the active pulse on tai or tbi is measured by the num- ber of timer counts which occur while the timer is al- lowed to operate. the active state of the auxiliary input line is defined by the associated interrupt channel's edge bit in the active edge register (aer). gpip4 of the aer is the edge bit associated with tai and gpip3 is associa- ted with tbi. when the edge bit is a one, the auxiliary input will be active high, enabling the timer while the input signal is at a high level. if the edge bit is low, the auxiliary input will be active low and the timer will operate while the input signal is at a low level. the state of the active edge bit also specifies whe- ther a zero-to-one transition or a one-to-zero trans- ition of the auxiliary input pin will produce an interrupt when the interrupt channel is enabled. in normal o- peration, programming the active edge bit to a one will produce an interrupt on the zero-to-one trans- ition of the associated input signal. alternately, pro- gramming the edge bit to a zero will produce an in- terrupt on the one-to-zero transition of the input si- gnal. however, in the pulse width measurement mode, the interrupt generated by a transition on tai or tbi will occur on the opposite transition as that normally defined by the edge bit. for example, in the pulse width measurement mode, if the edge bit is a one, the timer will be allo- wed to run while the auxiliary input tai is high. when tai transitions from high to low, the timer will stop and, if the interrupt channel is enabled, an interrupt will occur. by having the interrupt occur on the one- to-zero transition instead of the zero-to-one trans- ition, the processor will be interrupted when the pulse being measured has terminated and the width of the pulse is available from the timer. therefore, the timers act like a divide-by-prescaler that can be programmed by the timer data register and the ti- mer's a and b control register. after reading the contents of the timer, the main counter must be reinitialized by writing to the timer data register to allow consecutive pulses to be mea- sured. if the timer is written after the auxiliary input signal is active, the timer will count from the previous contents of the timer data register until it counts through 01 (hexadecimal). at the time, the main counter is loaded with the value from the timer data register, a time out pulse is generated which will tog- figure 12 : ? ts68hc901 18/42
gle the timer output, and an interrupt may be optio- nally generated on the timer interrupt channel. note that the pulse width measured will include counts from before the main counter was reloaded. if the timer data register is written while the pulse is transitioning to the active state, an indeterminate va- lue may be written into the main counter. once the timer is reprogrammed for another mode, interrupts will again occur as normally defined by the edge bit. note that an interrupt may be generated as the result of placing the timer into the pulse width measurement mode or by reprogramming the timer for another mode. also, an interrupt may be gene- rated by changing the state of the edge bit while in the pulse width measurement mode. event count mode operation in addition to the delay mode and the pulse width measurement mode, timers a and b may be pro- grammed to operate in the event count mode. like the pulse width measurement mode, the event count mode also requires an auxiliary input signal, tai or tbi, and the interrupt channels normally as- sociated with i4 and i3 will respond to transitions on tai and tbi respectively. general purpose lines i3 and i4 only function as i/o ports. in the event count mode the prescaler is disabled, allowing each active transition on taiand tbi to pro- duce a count pulse. the count pulse causes the main counter to decrement by one. when the timer counts through 01 (hexadecimal), a time out pulse is generated which will cause the output signal to toggle and may optionally produce an interrupt via the associated timer interrupt channel. the timer's main counter is also reloaded from the timer data re- gister. to count transitions reliably, the input signal may only transition once every four timer clock pe- riods. for this reason, the input signal must have a maximum frequency equal to one-fourth that of the timer clock. the active edge of the auxiliary input signal is defi- ned by the associated interrupt channel's edge bit. gpip4 of the aer specifies the active edge for tai and gpip3 defines the active edge for tbi. when the edge bit is programmed to a one, a count pulse will be generated on the zero-to-one transition of the auxiliary input signal. when the edge bit is program- med to a zero, a count pulse will be generated on the one-to-zero transition. also, note that changing the state of the edge bit while the timer is in the event count mode may produce a count pulse. besides generating a count pulse, the active trans- ition of the auxiliary input signal will also produce an interrupt on the i3 or i4 interrupt channel, if the in- terrupt channel is enabled. typically, in the event count mode, these channels are not enabled since the timer is automatically counting transitions on the input signal. if the interrupt channel is enabled, the number of transitions could be counted in the inter- rupt routine without requiring the use of the timer. timer registers the four timers are programmed via three control re- gisters and four timer data registers. control regis- ters tacr and tbcr and timer data registers tadr and tbdr (refer to figure 5.1) are associated with timers a and b respectively. timers c and d are controlled by the control register tcdcr and the data registers tcdr and tddr (refer to figure 13). timer data registers each timer's main counter is an 8-bit binary down counter. the value of the main counter may be read at any time by reading the timer's data register. the information read is the value of the counter which was captured on the last low-to-high transition of the ds pin. the main counter is initialized by writing to the ti- mer's data register. if the timer is stopped, data is loaded simultaneously into both the timer data regis- ter and the main counter. if the timer data register is written while the timer is enabled, the value is not loaded into the timer until the timer counts through 01 (hexadecimal). writing the timer data register while the timer is counting through 01 (hexadecimal) will cause an indeterminate value to be loaded into the timer's main counter. the four data registers are shown in figure 13. timer control registers bits in the timer control registers select the operation mode, select the prescaler value, and disable the ti- mers. timer control registers tacr and tbcr also have bits which allow the programmer to reset out- ? ts68hc901 19/42
7 (a) timer a data register 0 tadr (1fh) d7 d6 d5 d4 d3 d2 d1 d0 (b) timer b data register tbdr (21h) d7 d6 d5 d4 d3 d2 d1 d0 (c) timer c data register tcdr (23h) d7 d6 d5 d4 d3 d2 d1 d0 (d) timer d data register tddr (25h) d7 d6 d5 d4 d3 d2 d1 d0 cleared on reset writing 0 : cleared writing 1 : set figure 13 : ? ts68hc901 20/42
7 timer a control register 0 tacr (19h) 0* 0* 0* ta0 reset ac3 ac2 ac1 ac0 timer b control register tbcr (1bh) 0* 0* 0* tb0 reset bc3 bc2 bc1 bc0 cleared on reset 0* unused bits, read as zero. reset ta0/tb0 timer's a and b output lines (ta0 and tb0) may be forced low at any time by writing a one to the reset location in tacr and tbcr, respectively. the output will be held low only during the write operation ; at the conclusion of the operation the output will be allowed to toggle in response to a time-out pulse. when resetting ta0 and tb0, the remaining bits in the control register must be written with their previous value to avoid altering the operation mode. set: end of write cycle which clears the bit cleared: mpuwrites a zero ac3-ac0 bc3-bc0 these bits are decoded to determine the timer operation mode. ac3 bc3 ac2 bc2 ac1 bc1 ac0 bc0 operation mode 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 timer stopped* delay mode, 4 prescaler delay mode, 10 prescaler delay mode, 16 prescaler delay mode, 50 prescaler delay mode, 64 prescaler delay mode, 100 prescaler delay mode, 200 prescaler event count mode pulse width mode, 4 prescaler pulse width mode, 10 prescaler pulse width mode, 16 prescaler pulse width mode, 50 prescaler pulse width mode, 64 prescaler pulse width mode, 100 prescaler pulse width mode, 200 prescaler * regardless of the operation mode, counting is inhibited when the timer is stopped. the contents of the timer's main counter is not affected, although any residual count in the prescaler is lost. set: end of write cycle which clears the bit cleared: mpuwrites a zero figure 14 : ? ts68hc901 21/42
7 timer c and d control register 0 tcdcr (1dh) 0* cc2 cc1 cc0 0* dc2 dc1 dc0 cleared on reset 0* unused bits, read as zero. cc2-cc0 dc2-dc0 these bits are decoded to determine the timer operation mode. cc2 dc2 cc1 dc1 cc0 dc0 operation mode 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 timer stopped* delay mode, 4 prescaler delay mode, 10 prescaler delay mode, 16 prescaler delay mode, 50 prescaler delay mode, 64 prescaler delay mode, 100 prescaler delay mode, 200 prescaler * regardless of the operation mode, counting is inhibited when the timer is stopped. the contents of the timer's main counter is not affected, although any residual count in the prescaler is lost. set: end of write cycle which clears the bit cleared: mpuwrites a zero figure 15 : ? ts68hc901 22/42
put lines ta0 and tb0. these control registers are shown in figure 14. universal synchronous / asyn- chronous receiver-transmitter the universal synchronous / asynchronous recei- ver-transmitter (usart) is a single full-duplex serial channel with a double-buffered receiver and trans- mitter. there are separate receive and transmit clocks and separate receive and transmit status and data bytes. the receive and transmit sections are al- so assigned separate interrupt channels. each sec- tion has both a normal condition interrupt channel and an error condition interrupt channel. these channels can be optionally disabled from interrup- ting the processor and instead, dma transfers can be performed using the receiver ready and transmit- ter ready external cmfp signals. character protocols the cmfp usart supports asynchronous and with the aid of a polynomial generator checker (pgc) supports byte synchronous character for- mats. these formats are selected independently of the divide-by-one and divide-by-16 clock modes. when the divide-by-one clock mode is selected, synchronization must be accomplished externally. the receiver will sample the serial data on the rising edge of the receiver clock. in the divide-by-16 clock mode, the data is sampled at mid-bit time to in- crease transient noise rejection. also, when the divide-by-16 clock mode is selected, the usart resynchronization logic is enabled. this logic increases the channel's clock skew tolerance. when a valid transition is detected, an internal coun- ter is reset to state zero. transition checking is then inhibited until state four. then at state eight, the pre- vious state of the transition checking logic is clocked into the receive shift register. asynchronous format variable word length and start / stop bit configura- tions are available under software control for asyn- chronous operation. the word length can be five to eight bits and one, one and one-half, or two stop bits can be selected. the user can also select odd, even, or no parity. for character lengths of less than eight bits, the assembled character will consist of the re- quired number of data bits followed by zeros in the unused bit positions and a parity bit, if parity is en- abled. in the asynchronous format, start bit detection is al- ways enabled. new data is not shifted into the re- ceive shift register until a zero bit is received. when the divide-by-16 clock mode is selected, the false start bit logic is also active. any transition must be stable for three positive receive clock edges to be considered valid. then a valid zero-to-one transition must not occur for at least eight additional positive clock edges. synchronous format when the synchronous character format is selected, the 8-bit synchronous character loaded into the syn- chronous character register is compared to received serial data until a match is found. once synchroni- zation is established, incoming data is clocked into the receiver. the synchronous word will be conti- nuously transmitted during an underrun condition. all synchronous characters can be optionally strip- ped from the receive buffer. figure 15 shows the synchronous character register. the synchronous character is typically written after the data word length is selected, since unused bits in the synchronous character register are zeroed out. when parity is enabled, synchronous word length is the data word length plus one. the cmfp will compute and append the parity bit for the syn- chronous word when a word length of eight is selec- ted. however, if the word length is less than eight, 7 usart data register 0 udr (2fh) d7 d6 d5 d4 d3 d2 d1 d0 7 synchronous character register 0 scr (27h) d7 d6 d5 d4 d3 d2 d1 d0 figure 16 : ? ts68hc901 23/42
the user must determine the synchronous word pa- rity and write it into synchronous character. the cmfp will then transmit the extra bit in the synchro- nous word as a parity bit. usart control register the usart control register (ucr) selects the clock mode and the character format for the receive and transmit sections. this register is shown in fig- ure 17. receiver as data is received on the serial input line (si), it is clocked into an internal 8-bit shift register until the specified number of data bits have been assembled. this character will then be transferred to the receive buffer, assuming that the last word in the receiver buffer has been read. this transfer produces a buff- er full interrupt to the processor. reading the receive buffer satisfies the buffer full condition and allows a next data word to be trans- ferred to the receive buffer when it is assembled. the receive buffer is accessed by reading the u- sart data register (udr). the udr is simply an 8- bit data register used when transferring data from the cmfp and cpu. each time a word is transferred to the receive buffer, its status information is latched into the receiver sta- tus register (rsr). the rsr is not updated again until the data word in the receive buffer has been read. when a buffer full condition exists, the rsr should always be read before the receive buffer (udr) to maintain the correct correspondence be- tween data and flags. otherwise, it is possible that after reading the udr and prior to reading the rsr, a new word could be receive and transferred to the 7 usart control register 0 ucr (29h) clk wl1 wl0 st1 st0 pe e/o wu cleared on reset writing 0 : cleared writing 1 : set figure 17 : receive buffer. its associated flags would be latched into the rsr, over-writing the flags of the previous data word. then when the rsr were read to access the status information for the first data word, the flags for the new word would be retrieved. clk clock mode. when this bit is zero, data will be clocked into and out of the receiver and trans- mitter at the frequency of their respective clocks. when this bit is a one, data will be clocked into and out of the receiver and transmitter at one sixteenth the frequency of their respective clocks. also, the receiver data transition resynchronization logic will be enabled. wl0, wl1 word length. these two bits specify the length of the data word exclusive of start bits, stop bits, and parity. st0, st1 start/stop bit and format control. these two bits select the number of start and stop bits and also specify the character format. pe parity enable. when this bit is zero, no parity check will be made and no parity bit will be computed for transmission. when this bit is a one, parity will be checked by the receiver and parity will be calculated and inserted during data transmission. note that parity is not auto- matically appended to the synchronous character for word lengths of less than eight bits. in this case, the parity should be written into the synchronous character register along with the synchronous word. e/0 even/odd parity. when this bit is zero, odd parity is selected. when this bit is a one, even parity is selected. wu bit 0 reserved. must be maintained at 0. st1 st0 start bits stop bits format wl1 wl0 word length ? ts68hc901 24/42
0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 / 2 2 sync asyn c asyn c* asyn c 0 0 1 1 0 1 0 1 8 bits 7 bits 6 bits 5 bits (*) : only used with divide-by-16 clock mode receiver interrupt channels the usart receive section is assigned two inter- rupt channels. one indicates the buffer full condi- tion, while the other channel indicates an error condition. error conditions include overrun, parity error, synchronous found, and break. these inter- rupting conditions correspond to the bf, oe, pe, and f/s or b bits of the receiver status register. these flags will function as described in 6.2.2. whe- ther the receiver interrupt channels are enabled or disabled. while only one interrupt is generated per character received, two dedicated interrupt channels allow se- parate vector numbers to be assigned for normal and abnormal receiver conditions. when a received word has an error associated with it and the error in- terrupt channel is enabled, an interrupt will be gene- rated on the error channel only. however, if the error channel is disabled, an interrupt for an error condi- tion will be generated on the buffer full interrupt channel along with interrupts produced by the buffer full condition. the receiver status register must al- ways be read to determine which error condition produced the interrupt. receiver status register the receiver status register contains the receive buffer full flag, the synchronous strip enable, the re- ceiver enable, and various status information asso- ciated with the data word in the receive buffer. the rsr is latched each time a data word is transferred to the receive buffer. rsr flags cannot change a- gain until the data word has been read. the exception is the character in progress flag which monitors when a new word is being assembled in the asynchronous character format. the receiver status register is shown in figure 18. special receive considerations 7 receiver status register 0 rsr (2bh) bf oe pe fe f/s or b m/cip ss re cleared on reset figure 18 : certain receive conditions relating to the overrun error flag and the break defect flag require further ex- planation. consider the following examples : 1) a break is received while the receive buffer is full. this does not produce an overrun condition. only the b flag will be set after the receiver buffer is read. 2) a new word is received and the receive buffer is full. a break is received before the receive buffer is read. both the b and oe flags will be set when the buffer full condition is satisfied. bf buffer full. this bit is set when a received word is transferred to the receive buffer. this bit is cleared when the receive buffer is read by accessing the usart data register (udr). this bit is read only. set : received word transferred to buffer cleared : receive buffer read oe overrun error. an overrun error occurs when a received word is due to be transferred to the receive buffer, but the receive buffer is full. neither the receive buffer nor the rsr is overw- ritten. the oe bit is set after the receive buffer full condition is satisfied by reading the udr. this error condition will generate an interrupt to the processor. the oe bit is cleared by rea- ding the rsr. new data words will not be assembled until the rsr is read. ? ts68hc901 25/42
set : incoming word received and receive buffer full cleared : receiver status register read pe parity error. this bit is set when the word transferred to the receive buffer has a parity error. this bit is cleared when the word transferred to the receive buffer does not have a parity error. set : word in receive buffer has a parity error cleared : word in receive buffer does not have a parity error fe frame error. a frame error exists when a non-zero data word is not followed by a stop bit in the asynchronous character format. the fe bit is set when the word transferred to the receive buffer has a frame error. the fe bit is cleared when the word transferred to the receive buffer does not have a frame error. set : word in receive buffer has a frame error cleared : word in receive buffer does not have a frame error f/s or b found/search or break detect. in the synchronous character format this bit can be set or clea- red by software. when the bit is a zero, the usart receiver is placed in the search mode. the incoming data is compared to the synchronous character register (scr) and the word length counter is disabled. the f/s bit will automatically be set when a match is found and the word length counter will be enabled. an interrupt will also be produced on the receive error channel. set : incoming word matches synchronous character cleared : mpu writes a zero or incoming word does not match synchronous character in the asynchronous character format, this flag indicates a break condition. a break is detec- ted when an all zero data word with no stop bit is received. the break condition continues until a non-zero data bit is received. the 8-bit is set when the word transferred to the receive buffer is a break indication. a break condition generates an interrupt to the processor. this bit is cleared when a non-zero data bit is received and the break condition has been acknow- ledged by reading the rsr at least once. an end of break interrupt will be generated when the bit is cleared. set : word in receive buffer is a break cleared : break terminates and receiver status register read since beginning of break condition m or cip match/character in progress. in the synchronous format, this flag indicates that a synchro- nous character has been received. the m bit is set when the word transferred to the receive buffer matches the synchronous character register. the m bit is cleared when the word trans- ferred to the receive buffer does not match the synchronous character register. set : word transferred to receive buffer matches the synchronous character cleared : word transferred to receive buffer does not match synchronous character in the asynchronous character format, this flag indicates that a word is being assembled. the cip bit is set when a start bit is detected. the cip bit is cleared when the final stop bit has been received. set : start bit is detected cleared : end of word detected ss synchronous strip enable. when this bit is a one, data words that match the synchronous character register will not be loaded into the receive buffer and no buffer full condition will be produced. when this bit is a zero, data words that match the synchronous character register will be transferred to the receive buffer and a buffer full condition will be produced. set : mpu writes a one receiver status register (continued) ? ts68hc901 26/42
cleared : mpu writes a zero re receiver enable. when this bit is a zero, the receiver will be immediately disabled. all flags will be cleared. when this bit is a one, normal receiver operation is en- abled. this bit should no be set to a one until the receiver clock is active. set : mpu writes a one or transmitter is disabled in auto-turnaround mode cleared : mpu writes a zero transmitter the transmit buffer is loaded by writing to the u- sart data register (udr). the data word will be transferred to an internal 8-bit shift register when the last word in the shift register has been transmitted. this will produce a buffer empty condition. if the transmitter completes the transmission of word in the shift register before a new word is written to the transmit buffer, an underrun error will occur. in the asynchronous character format, the transmitter will send a mark until the transmit buffer is written. in the synchronous character format, the transmitter will continuously send the synchronous character. the transmit buffer can be loaded prior to enabling the transmitter. after the transmitter is enabled, there is a delay before the first bit is output. the se- rial output line (so) should be programmed to be high, low, or high impedance when the transmitter is enabled to force the output line to the desired state until the first bit is shifted out. note that a one bit will always be transmitted prior to the word in the trans- mit shift register when the transmitter is first en- abled. when the transmitter is disabled, any word currently being transmitted will continue to completion. how- ever, any word in the transmit buffer will not be trans- mitted and will remain in the buffer. so, no buffer empty condition will occur. if the buffer is empty when the transmitter is disabled, the buffer empty condition will remain, but no underrun condition will be generated when the word in transmission is completed. if no word is being transmitted when the transmitter is disabled, the transmitter will stop at the next rising edge of the internal shift clock. in the asynchronous character format, the transmit- ter can be programmed to send a break. the break will be transmitted once the word currently in the shift register has been sent. if the shift register is empty, the break command will be effective imme- diately. an end interrupt will be generated at every normal character boundary to aid in timing the break transmission. the break will continue until the break command is cleared. any character in the transmit buffer at the start of a break will be transmitted when the break is termina- ted. if the transmit buffer is empty at the start of a break, it may be written at any time during the break. if the buffer is still empty at the end of the break, an underrun condition will exist. disabling the transmitter during a break condition causes the transmitter to cease transmission of the break character at the end of the current character. no end of break stop bit will be transmitted. even if the transmit buffer is empty, no buffer empty condi- tion will occur nor will an underrun condition occur. also, any word in the transmit buffer will remain. transmitter interrupt channels the usart transmit section is assigned two inter- rrupt channels. one channel indicates a buffer emp- ty condition and the other channel indicates an un- derrun or end condition. these interrupting condi- tions correspond to the be, ue, and end flag bits of the transmitter status register (tsr). the flag bits will function as described below, whether their asso- ciated interrupt channel is enabled or disabled. transmitter status register the transmitter status register contains various transmitter error flags and transmitter control bits for selecting auto-turnaround and loopback mode. the tsr is shown in figure 19. dma operation ? ts68hc901 27/42
7 0 tsr (2dh) be ue at end b h l te figure 19 : usart error conditions are only valid for each character boundary. when the usart performs block data transfers by using the dma handshake line rr (receiver ready) and tr (transmitter ready), errors must be saved and checked at the end of a block. this is accomplished by enabling the error channel for the receiver or transmitter and by masking interrupts for this channel. once the transfer is complete, interrupt pending register a is read. any pending receiver or transmitter error indicates an error in the data transfer. be buffer empty. this bit is set when the word in the transmit buffer is transferred to the transmit shift register. this bit is cleared when the transmit buffer is reloaded by writing to the usart data register (udr). set : transmit buffer contents transferred to transmit shift register cleared : transmit buffer written ue underrun error. this bit is set when the word in the transmit shift register has been transmitted before a new word is loaded into the transmit buffer. this bit is cleared by reading the tsr or by disabling the transmitter. this bit does not need to be cleared before writing to the udr. set : transmit shift register contents transmitted before transmit buffer written cleared : transmitter status register read or transmitter disabled at auto-turnaround. when this bit is set, the receiver will be enabled automatically after the transmitter has been disabled and the last character being transmitted is completed. set : mpu writes a one cleared : transmitter disabled end end of transmission. when the transmitter is disabled while a character is being transmitted, the end will be set after the character transmission is complete. if no word is being transmitted when the transmitter is disabled, the end bit will be set immediately. the end bit is cleared by reenabling the transmitter. set : transmitter disabled cleared : transmitter enabled b break. this bit has no function in the synchronous character format. in the asynchronous character format, when this bit is set to a one, a break will be transmitted upon the completion of the transmission of any word in the trans- mit shift register. a break consists of an all zero data word with no stop bit. when this bit is cleared by software, the break indication will cease and normal transmission will resume. note that when b is set, be cannot be set. set : mpu writes a one cleared : mpu writes a zero h, l high and low. these control bits configure the transmitter output (so) when the transmitter is disabled. these bits also force the transmitter output after the transmitter is enabled until end is cleared. loopback mode internally connects the transmitter output to the receiver input and the trans- mitter clock to the receiver clock internally. the receiver clock (rc) and the serial input (si) are not used. when the transmitter is disabled, so is forced high. set : mpu writes a one h l output 0 0 1 1 0 1 0 1 high impedance low high loopback mode ? ts68hc901 28/42
absolute maximum ratings symbol parameter value unit v i voltage on any pin with respect to ground 0.3 to + 7 v v dd supply voltage 0.3 to + 7 v t a operating temperature range c suffix 0 to + 70 c t stg storage temperature 65 to + 150 c stresses above those listed under aabsolute maximum rati ngso may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these or any other condition above those indicated in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods may affect reliability. d.c. characteristics t a =0 cto70 c;v cc =+5v 5% unless otherwise specified symbol parameter test condition min. max. unit v ih input high voltage except xtal1, xtal2 2.0 v cc +.3 v v ih input high voltage xtal1, xtal2 v dd -1.5 v cc +.3 v v il input low voltage 0.3 0.8 v v oh output high voltage (except dtack) i oh = 120 m a 4.1 v v ol output low voltage (except dtack) i ol = 2.0ma 0.5 v i cc power supply current outputs open 6 ma i li input leakage current v in = 0 to v cc 10 m a i loh tri-state output leakage current in float v out = 2.4 to v cc 10 m a i lol tri-state output leakage current in float v out = 0.5v 10 m a i oh dtack output source current v out = 2.4 400 m a i ol dtack output sink current v out = 0.5 5.3 ma p d power dissipation 32 mw all voltages are referenced to ground. ts68hc901 electrical specifications thermal characteristics symbol parameter value unit q j a thermal resistance (plastic) 50 c/w ? ts68hc901 29/42
ac electrical characteristics (v cc = 5.0vdc 5%, gnd = 0vdc, t a =0 cto70 c) number characteristic value unit 4mhz 5mhz 8mhz min. max. min. max. min. max. 1 cs, ds width high 50 35 25 ns 2 r/w, a1-a5 valid to falling cs (setup) 30 25 20 ns 3 data valid prior to falling clk 280 150 100 ns 4 (3) cs, iack valid to falling clock (setup) 50 50 50 ns 4a (4) falling clock to next cs low 100 80 50 ns 5 clk low to dtack low 220 180 90 ns 6 cs, ds or iack high to dtack high 60 55 50 ns 7 cs, ds or iack high to dtack tri-state 100 100 100 ns 8 dtack low to data invalid (hold time) 0 0 0 ns 9 cs, ds or iack high to data tri-state 50 50 50 ns 10 cs or ds high to r/w, a1-a5 invalid (hold time) 000ns 11 (3,5) data valid from cs low 310 260 200 ns 12 read data valid to dtack low (setup) 50 50 20 ns 13 dtack low to ds, cs or iack high (hold time) 000ns 14 iei low to falling clk (setup) 50 50 50 ns 15 (1) ieo valid from clock low (delay) 180 180 120 ns 16 data valid from clock low (delay) 300 300 180 ns 17 ieo invalid from iack high (delay) 150 150 100 ns 18 dtack low from clock high (delay) 180 165 100 ns 19 (1) ieo valid from iei low (delay) 100 100 100 ns 20 data valid from iei low (delay) 220 220 195 ns 21 clock cycle time 250 1000 200 1000 125 1000 ns 22 clock width low 110 90 55 ns 23 clock width high 110 90 55 ns 24 (4) ds inactive to rising clock (setup) 100 80 50 ns 25 i/o minimum active pulse width 100 100 100 ns 26 iack width high 2 2 2 t clk 27 i/o data valid from rising cs or ds 450 450 350 ns 28 receiver ready delay from rising rc 600 600 200 ns 29 transmitter ready delay from rising tc 600 600 200 ns notes : 1. ieo only goes low if no acknowledgeable interrupt is pending. if ieo goes low, dtack and the data bus re- main tri-stated. 2. t clk refers to the clock applied to the mfp clk input pin. t clk refers to the timer clock signal, regardless of whetherthat signal comes from thextal 1/xtal2 crys- tal clock inputs or the tai or tbi timer inputs. 3. if the setup time is not met, cs or iack will not be reco- gnized until the next falling clk. 4. if this setup time is met (for consecutive cycles), the mi- nimum hold-off time of one clock cycle will be obtained. if not met, the hold-off will be two clock cycles. 5. although cs and dtack are synchronized with the clock, the data out during a read cycle is asynchronous to the clock, relying only on cs for timing. 6. spec. 30 applies to timer outputs tao and tbo only. ? ts68hc901 30/42
ac electrical characteristics (continued) (v cc = 5.0vdc 5%, gnd = 0vdc, t a =0 cto70 c) number characteristic value unit 4mhz 5mhz 8mhz min. max. min. max. min. max. 30 (6) timer output low from rising edge of cs or ds (a & b) (reset t out ) 450 450 200 ns 31 (2) t out valid from internal timeout 2 t clk + 300 2t clk + 300 2t clk + 300 ns 32 timer clock low time 110 90 55 ns 33 timer clock high time 110 90 55 ns 34 timer clock cycle time 250 1000 200 1000 125 1000 ns 35 reset low time 2 1.8 1.5 m s 36 delay to falling intr from external interrupt active transition 380 380 250 ns 37 transmitter internal interrupt delay from falling edge of tc 550 550 350 ns 38 receiver buffer full interrupt transition delay from rising edge of rc 800 800 400 ns 39 receiver error interrupt transition delay from falling edge of rc 800 800 400 ns 40 serial in set up time to rising edge of rc (divide by one only) 80 70 50 ns 41 data hold time from rising edge of rc (divide by one only) 350 325 100 ns 42 serial output data valid from falling edge of tc ( 1) 440 420 200 ns 43 transmitter clock low time 500 450 250 ns 44 transmitter clock high time 500 450 250 ns 45 transmitter clock cycle time 1.05 0.95 0.55 m s 46 receiver clock low time 500 450 250 ns 47 receiver clock high time 500 450 250 ns 48 receiver clock cycle time 1.05 0.95 0.55 m s 49 (2) cs, iack, ds width low 80 80 80 t clk 50 serial output data valid from falling edge of tc ( 16) 490 370 250 ns notes : 2. t clk refers to the clock applied to the mfp clk input pin. t clk refers to the timer clock signal, regardless of whetherthat signal comes from thextal 1/xtal2 crys- tal clock inputs or the tai or tbi timer inputs. 6. spec. 30 applies to timer outputs tao and tbo only. ? ts68hc901 31/42
timer a.c. characteristics definitions : error = indicated time value - actual time value tpsc = t clk x prescale value internal timer mode single interval error (free running) (note 2) 100ns cumulative internal error 0 error between two timer reads (tpsc + 4t clk ) start timer to stop timer error + (2t clk + 100ns) to - (tpsc + 6t clk + 100ns) start timer to read timer error + 0 to (tpsc + 6t clk + 400ns) start timer to interrupt request error (note 3) - 2t clk to (4t clk + 800ns) pulse width measurement mode measurement accuracy (note 1) + 2t clk to (tpsc + 4t clk ) minimum pulse width 4t clk event counter mode minimum active time of tai, tbi 4t clk minimum inactive time of tai, tbi 4t clk notes : 1.error may be cumulative if repetitively performed. 2.error with respect to t out or int if note 3 is true. 3.assuming it is possible for the timer to make an inter- rupt request immediately. ? ts68hc901 32/42
figure 21 : no te : cs and iack must be a function of ds. figure 22 : ? ts68hc901 33/42
figure 23 : note : cs and iack must be a function of ds. figure 24 : ? ts68hc901 34/42
figure 25 : interrupt timing note : active edge is assumed to be the rising edge. figure 26 : port timing ? ts68hc901 35/42
figure 27 : receiver timing figure 28 : transmitter timing ? ts68hc901 36/42
figure 29 : timer timing figure 30 : reset timing ? ts68hc901 37/42
figure 31 : multiplexed bus timing motorola type n parameter min. max. unit 2 cycle time 800 ns 3 pulse width ds low or rd/wr high 350 ns 4 pulse width ds high or rd/wr low 340 ns 5 pulse width as/ale high 100 ns 6 delay as fall to ds rise or ale fall to rd/wr fall 30 ns 7 delay ds or rd/wr rise to as/ale rise 30 ns 8 r/w setup time to ds 100 ns 9 r/w hold time to ds 10 ns 10 address setup time to as/ale 20 ns 11 address hold time to as/ale 20 ns 12 data setup time to ds or wr (write) 280 ns 13 delay data to ds or rd (read) 250 ns 14 data hold time to ds or wr (write) 20 ns 15 data hold time to ds or rd (read) 0 100 ns 16 ce setup time to as/ale fall 20 ns 17 ce hold time to ds, rd or wr 20 ns ac electrical characteristics - multiplexed bus timing (v cc =5.0v v dc 5%, v ss =0v dc ,t a =0 to 70 c unless otherwise noted) see fi- ? ts68hc901 38/42
figure 32 : multiplexed bus timing - intel type ? ts68hc901 39/42
figure 34 : intr test load crystal parameters : parallel resonance, fundamental mode at cut r s 150 w (f r =2.85.0mhz); r s 300 w (f r =2.02.7mhz) c l = 18pf ; c m =0.02pf;c h = 5pf ; l m = 96mh f r (typ) = 2.4576mhz figure 35 : external oscillator components capacitance t a =25 c, f = 1mhz unmeasured pins returned to ground. symbol parameter test condition max. unit c in input capacitance unmeasured pins returned to ground 10 pf c out tri-state output capacitance 10 pf for all outputs except dtack for dtack c l = 100pf c l =130pf r l =20k w r l =6k w r 1 =1.9k w r 1 =740 w figure 33 : typical test load other possible configuration: xtal1 driven with a cmos clock and xtal2 not connec- ted figure 36 : external clock connection. symbol parameter value unit 4mhz 5mhz 8mhz min. max. min. max. min. max. f frequency of operation 1.0 4.0 1.0 5.0 1.0 8.0 mhz t cyc cycle time 250 1000 200 1000 125 1000 ns t cl ,t ch clock pulse width 110 480 90 480 55 480 ns t cr ,t cf rise and fall times - 15 - 10 - 10 ns clock timing ? ts68hc901 40/42
52 pin plastic leadless chip carrier package (fn) dim. mm inches min typ max min typ max a 4.20 5.08 0.165 0.200 a1 0.64 0.025 a3 2.29 3.30 0.090 0.130 b 0.331 0.533 0.013 0.021 b1 0.661 0.812 0.026 0.032 d 19.94 20.19 0.785 0.795 d1 19.050 19.202 0.750 0.756 d3 15.24 0.600 e 19.94 20.19 0.785 0.795 e1 19.050 19.202 0.750 0.756 e3 15.24 0.600 k1------ e 1.27 0.050 number of pins n52 nd 13 ne 13 48 pin plastic dual-in-line package, 600 mil width (p) dim. mm inches min typ max min typ max a 2.2 4.8 0.086 0.189 a1 0.51 1.77 0.010 0.069 b 0.38 0.58 0.015 0.023 b1 0.97 1.52 0.055 0.065 c 0.2 0.3 0.008 0.009 d 60.46 61.62 2.400 2.425 d1 e 16.3 0.641 e1 12.9 0.508 k1 k2 l 3.18 4.44 1.25 0.174 e1 2.54 0.10 number of pins n48 ? ts68hc901 41/42
ts68hc901 ordering information part number package type max. clock frequency temperature range ts68hc901cp4 ts68hc901cp5 ts68hc901cp8 plastic dip 4.0mhz 5.0mhz 8.0mhz 0to70 c TS68HC901CFN4 ts68hc901cfn5 ts68hc901cfn8 plcc 4.0mhz 5.0mhz 8.0mhz 0to70 c information furnished is believed to be accurate and reliable. however, sgs-thomson microelectronics assumes no responsability for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of sgs-thomson microelectronics. specifications mentioned in this publication are subject to change without notice. this publication supersedes and replaces all information previously supplied. sgs-thomson microelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of sgs-thomson microelectronics. ? 1994 sgs-thomson microelectronics - all rights reserved. purchase of i 2 c components by sgs-thomson microelectronics conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system is granted provided that the system conforms to the i 2 c standard specification as defined by philips. sgs-thomson microelectronics group of companies australia - brazil - france - germany - hong kong - italy - japan - korea - malaysia - malta - morocco - the netherlands singapore - spain - sweden - switzerland - taiwan - thailand - united kingdom - u.s.a. ? ts68hc901 42/42


▲Up To Search▲   

 
Price & Availability of TS68HC901CFN4

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X